
public class MiniDuckSimulator {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Duck mallard = new MallardDuck();
		mallard.display();
		mallard.quack();
		mallard.swim();
		mallard.fly();
		
		Duck redhead = new RedheadDuck();
		redhead.display();
		redhead.quack();
		redhead.swim();
		redhead.fly();

		Duck rubberduck= new RubberDuck();
		rubberduck.display();
		rubberduck.quack();
		rubberduck.swim();
		rubberduck.fly();
		
		System.out.println("A better way: Duck Collection");
		Duck[] duckArray = new Duck[2];
		duckArray[0] = mallard;
		duckArray[1] = redhead;
		for (Duck duck : duckArray) {
		    duck.display();
		    duck.quack();
		    duck.swim();
		}
	}

}
